const fs = require('fs')
fs.readFile(__dirname + '/1.txt', 'utf-8', (err, dataStr) => {
  if (err) {
    console.log(err.message)
  }
  console.log('文件读取成功:' + dataStr)
})
process.nextTick(function () {
  fs.writeFile(__dirname + '/1.txt', 'hahaha', (err) => {
    if (err) {
      console.log(err.message)
    }
    console.log('文件写入成功')
  })
})
